import { useMount } from "ahooks";
import { PropsWithChildren } from "react";
import { useNavigate } from "react-router-dom";

interface IProps {
  className?: string;
}

export default (props: PropsWithChildren<IProps>): JSX.Element => {
  const { children } = props;
  const nav = useNavigate();

  useMount(() => {
    nav("/");
  });

  return <div className="flex flex-row items-center">{children}</div>;
};
